home *** CD-ROM | disk | FTP | other *** search
- function mSetCharacter(astrchar)
- {
- this.strChar = astrchar;
- }
- function mResumeLevel()
- {
- this.sndFondo.stop();
- this.gotoAndPlay("game");
- }
- function mStartGame()
- {
- this.intLevel = 0;
- this.intScore = 0;
- this.intLives = this.intmaxLives;
- this.sndIntro.stop();
- this.sndIntroLoop.stop();
- this.sndFondo.stop();
- this.sndFondo.start(0,9999);
- this.gotoAndPlay("selection");
- }
- function mAddLife()
- {
- this.intLives = this.intLives + 1;
- if(this.intLives > this.intmaxLives)
- {
- this.intLives = this.intmaxLives;
- }
- }
- function mLooseLife()
- {
- this.intLives--;
- if(this.intLives < 0)
- {
- this.mGameOver();
- }
- else
- {
- this.gotoAndPlay("vida");
- }
- }
- function mGameOver()
- {
- this.sndFondo.start(0,9999);
- this.gotoAndPlay("gameover");
- }
- function mJumpLevel()
- {
- this.intLevel = this.intLevel + 1;
- this.mDisplayLevel();
- }
- function mColorSelect()
- {
- this.gotoAndPlay("color");
- }
- function mDisplayLevel()
- {
- if(this.intLevel > this.intLevels)
- {
- this.sndFondo.start(0,9999);
- this.gotoAndPlay("finish");
- }
- else if(this.intLevel == 1)
- {
- this.mResumeLevel();
- }
- else
- {
- this.sndFondo.start(0,9999);
- this.gotoAndPlay("jumplevel");
- }
- }
- function mAddScore(intscore)
- {
- this.intScore += intscore;
- }
- this.intmaxLives = 3;
- this.sndIntro = new Sound(this);
- this.sndIntro.attachSound("intro_loopeable.wav");
- this.sndIntroLoop = new Sound(this);
- this.sndIntroLoop.attachSound("intro_loop.wav");
- this.sndFondo = new Sound(this);
- this.sndFondo.attachSound("base_global");
- this.intLevel = 0;
- this.intLevels = 4;
- gotoAndPlay(4);
-